<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>统计管理</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$('#status').val('${status}');
			$('#awardType').val('${awardType}');
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/wechat/statics/statUsed/">奖品明细</a></li>
	</ul>
	<form id="searchForm"   action="${ctx}/wechat/statics/detail/" method="post" class="breadcrumb form-search">
		<input type="hidden" name="search.aa" value="111">
		<label>奖品名称：</label>
					<input type="text" name="name" class="input-medium"/>
		<label>会员名称：</label>
					<input type="text" name="memberName" class="input-medium"/>
		<label>手机：</label>
					<input type="text" name="mobile" class="input-medium"/>
		<label>状态：</label>
					<select name="status" id="status" class="input-medium">
						<option value="">全部</option>
						<option value="0">未使用</option>
						<option value="1">已核销</option>
						<option value="2">已作废</option>
					</select>
		<br><br><label>开始时间：</label>
					<input id="startTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="${startTime}"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
						
		<label>结束时间 ：</label>
					<input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="${endTime }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
		<label>分类：</label>
					<select name="awardType" id="awardType" class="input-medium">
						<option value="">全部</option>
						<option value="商家抽奖">商家抽奖</option>
						<option value="会员抽奖">会员抽奖</option>
						<option value="积分兑换">积分兑换</option>
						<option value="优惠券">优惠券</option>
						<option value="秒杀中奖">秒杀中奖</option>
						</select>
		&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form>
	<tags:message content="${message}"/>
 	
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr>
			<th>序号</th>
		<shiro:hasPermission name="sys:user:edit"><th>所属商家</th></shiro:hasPermission>
			<th>微会员</th>
			<th>手机</th>
			<th>中奖类型</th>
			<th>奖品名称</th>
			<th>奖品状态</th>
			<th>中奖时间</th>
			<th>核销时间</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${statics}" var="stat" varStatus="st">
			<tr>
				<td>${st.index+1}</td>
				<shiro:hasPermission name="sys:user:edit"><td>${user.name}</td></shiro:hasPermission>
				<td>${stat.member_name}</td>
				<td>${stat.mobile } </td>
				<td>${stat.award_type } </td>
				<td>${stat.NAME } </td>
				<td> 
					<c:if test="${stat.STATUS == 1 }">已核销</c:if> <c:if test="${stat.STATUS == 0 }">未使用</c:if><c:if test="${stat.STATUS == 2 }">已作废</c:if>
				 </td>
				<td>${stat.create_time } </td>
				<td title="${stat.remarks }">${stat.update_time } </td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
</body>
</html>
